ViewStructureCompat

Helper for accessing features in ViewStructure.

Currently this helper class only has features for content capture usage. Other features for Autofill are not available.

Functions

Link copied to clipboard
open fun setClassName(@NonNull string: @NonNull String)
Set the class name of the view, as per View.getAccessibilityClassName().
Link copied to clipboard
open fun setContentDescription(@NonNull charSequence: @NonNull CharSequence)
Set the content description of the view, as per View.getContentDescription().
Link copied to clipboard
open fun setDimens(left: Int, top: Int, scrollX: Int, scrollY: Int, width: Int, height: Int)
Set the basic dimensions of this view.
Link copied to clipboard
open fun setText(@NonNull charSequence: @NonNull CharSequence)
Set the text that is associated with this view.
Link copied to clipboard
@RequiresApi(value = 23)
@NonNull
open fun toViewStructure(): @NonNull ViewStructure
Provides the ViewStructure represented by this object.
Link copied to clipboard
@RequiresApi(value = 23)
@NonNull
open fun toViewStructureCompat(@NonNull contentCaptureSession: @NonNull ViewStructure): @NonNull ViewStructureCompat
Provides a backward-compatible wrapper for ViewStructure.